#include <iostream>
#include <vector>

using namespace std;

int main() {
    uint64_t sum = 1;
    uint64_t diff = 2;
    for (uint64_t i = 3; i <= 1001; i += 2) {
        uint64_t t = i * i;
        sum += t + (t - diff) + (t - diff - diff) + (t - diff - diff - diff);
        diff += 2;
    }
    cout << sum << endl;
}